export class MyArray {
    static getDim(arr) {
        if (!(arr instanceof Array))
            return 0
        let n = 1
        while (arr[0] instanceof Array) {
            n++
            arr = arr[0]
        }
        return n
    }

    static getCenterIdx(arr) {
        // let peekSize = [arr.length, arr[0].length]
        // return peekSize.map(e => Math.floor(e / 2))
        return [Math.floor(arr.length / 2), Math.floor(arr[0].length / 2)]
    }

}